<template>
  <div class="card-common-inner public-line-over-view">
    <div class="over-view-total">
      
      <div class="more-item" @click="gotoPage('/publicline/payroll')">
        <img src="~@/assets/imgs/publicline/index/icon_gzd.png" />
        <div class="total-title">我的工资单</div>
      </div>
      <div class="more-item" @click="gotoPage('/publicline/kdcs/task')">
        <img src="~@/assets/imgs/publicline/index/icon_xqcs.png" />
        <div class="total-title">四张网建优甩帽</div>
      </div>
      
    </div>
    
    <!-- </div> -->
  </div>
</template>

<script>
import { Toast } from 'vant'

export default {
  components: {  },
  methods: {
    gotoPage( path ) {
      this.$open.call(this, path);
    },
    openNewWindow( type ) {
      qm.auth.getAccessToken({
        onSuccess:function(res){
          let url = "";
          if ( type == 'zhmd' ) url = "https://sxyyxt.cn/istore/user/zwAppLogin?appToken=";
          if ( type == 'gdqd' ) {
            url = "https://sxyyxt.cn/gdqd/zwAppLogin?token=";
            qm.webNavigation.hideNavigationBar();
          }
          if ( type == 'zshj' ) {
            url = "http://123.138.11.5:9300/#/Login";
            qm.webNavigation.hideNavigationBar();
          }
          if ( type == 'bims' ) url = "https://sxyyxt.cn/bims/user/zwAppLogin?appToken=";
          if ( type == 'xq' ) {
            const params = JSON.stringify({ accessToken: res.accessToken });
            url = "https://sxyyxt.cn/wocsApp/pages/communityView/search.html?_data=" + encodeURI(params);
            qm.jump.openNewBrowser({ url } );
            return;
          }
          if ( type == '360' ) {
            const params = JSON.stringify({ accessToken: res.accessToken });
            url = "https://sxyyxt.cn/wocsApp/pages/MyManpower/360Viewindex.html?_data=" + encodeURI(params);
            qm.jump.openNewBrowser({ url } );
            return;
          }

          qm.jump.openNewBrowser({
            url: url + res.accessToken
          } );
        },
        onError:function(res){
          Toast.fail({
            message: "获取用户token失败！"
          })
        }
      });
    }
  }
}
</script>
<style lang="less" scoped>
@import '~@/assets/less/card.less';
.public-line-over-view {
  .over-view-total .total-item,
  .over-view-total .more-item,
  .over-view-more .more-item {
    text-align: center;
    .total-title {
      font-size: 13px;
      color: #666;
      margin-top: 2px;
      white-space: nowrap;
    }
  }
  .over-view-total {
    padding: 0 10px;
    display: flex;
    align-items: center;
    // justify-content: space-between;
    justify-content: space-around;
    .total-item {
      img {
        // width: 54px;
        width: 43px;
      }
    }
    .more-item {
      width: 20%;
      height: 69px;
      display: flex;
      align-items: center;
      flex-direction: column;
      justify-content: center;
      img {
        width: 43px;
      }
      .other-img {
        width: 24px;
        padding: 2px 0;
      }
    } 
  }
  .over-view-more {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-top: 12px;
    .more-item {
      width: 20%;
      height: 69px;
      display: flex;
      align-items: center;
      flex-direction: column;
      justify-content: center;
      img {
        width: 28px;
      }
      .other-img {
        width: 24px;
        padding: 2px 0;
      }
    }
  }
}
/deep/ .staff-swipe {
  .van-swipe__indicators {
    bottom: 0;
  }
  .van-swipe__indicator {
    width: 4px;
    height: 4px;
    background-color: #999;
    opacity: .9;
    &:not(:last-child) {
      margin-right: 4px;
    }
  }
  .van-swipe__indicator--active {
    background-color: #3e83fd;
    opacity: 1;
    width: 10px;
    border-radius: 4px;
  }
}
</style>
